package ysq.xyg.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysq.xyg.dao.ShareOrderDao;
import ysq.xyg.model.ShareOrder;
import ysq.xyg.service.ShareOrderService;

import javax.annotation.Resource;
import java.util.List;

/**
 * 分享订单
 *
 * @author congcong tao
 * @create 2018/8/9 下午11:10
 */
@Service("shareOrderService")
public class ShareOrderServiceImpl extends BaseServiceImpl<ShareOrder> implements ShareOrderService {

    @Resource
    private ShareOrderDao shareOrderDao;
    @Autowired
    public void setShareOrderDao(ShareOrderDao shareOrderDao) {
        this.baseDao = shareOrderDao;
    }

    @Override
    public PageInfo<ShareOrder> pageInfo(ShareOrder shareOrder, int pageSize, int pageNum) {
        PageHelper.startPage(pageNum, pageSize);
        List<ShareOrder> list = shareOrderDao.selectEntity(shareOrder);
        return new PageInfo<ShareOrder>(list);
    }
}
